#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#  Copyright (c) JoinQuant Development Team
#
#  Author: Huayong Kuang <kuanghuayong@joinquant.com>
#  CreateTime: 2017-12-20 19:54:42 Wednesday
# *************************************************************

def pytest_addoption(parser):
    parser.addoption("--run-full", action="store_true",
        help="run full test")


def pytest_assertrepr_compare(op, left, right):
    from test_foocompare import Foo
    if isinstance(left, Foo) and isinstance(right, Foo) and op == "==":
        return ['Comparing Foo instances:', 'vals: %s != %s' % (left.val, right.val)]


def pytest_runtest_setup(item):
        # called for running each test in 'a' directory
        print ("setting up", item)
